//index.js
//获取应用实例
const app = getApp()
const mapKey = '2QEBZ-77K6J-CFDFO-FWGBD-UMOWS-VYBZX'
import {request} from '../../utils/wxRequest'
import {getLocation, wxLogin} from '../../utils/wxPromise'
import {locationIP} from '../../api/index'
import QQMapWX from '../../plugin/qqmap-wx-jssdk.min'
let { windowHeight } = wx.getSystemInfoSync();

const qqmapsdk = new QQMapWX({
    key: mapKey
});
let ctx = null
Page({
    data: {
        longitude: 104.057615,
        latitude: 30.657019,
        markers: [],
        polyline: [],
        repect:1000,
        dialogAnimate:null
    },
    //点击marker
    markertap(e) {
        console.log(e)
    },
    //移动地图
    regionchange(e) {
        console.log(e)
        if (e.type === 'end') {
            ctx.getScale({
                success(res) {
                    let scale = res.scale;
                    console.log(scale);
                }
            });

        }
    },
    async onReady() {

    },
  async  onLoad() {
        // let login = await wxLogin()
      // let {data} = await request({
      //     url: `auth/authLogin`,
      //     method: "POST",
      //     data: formData
      // })
    }
})
